<!DOCTYPE html>
<html>
    <head>
        <title>test</title>
        <meta charset="UTF-8">
        <script src="../../dist/avalon.js"></script>
    </head>
    <body>
        <div ms-controller="test">
            <div>
                <div ms-for="el in ##data">
                    {{el.name}}
                    <a href="#" ms-click="##del(el)">删除</a>
                    <div ms-for="item in el.list">
                        {{item.name}}
                    </div>
                </div>
            </div>
        </div>
        <script>
    var vm = avalon.define({
        $id: "test",
        data: [{name: "test1", list: [{name: "item11"}]}
            , {name: "test2", list: [{name: "item21"}, {name: "item22"}]}],
        del: function (el) {
            vm.data.remove(el);
            avalon.log(vm.data[0].list.length);
        }
    });
        </script>
    </body>
</html>